<%-- 
    Document   : SignupBeans
    Created on : Mar 24, 2011, 7:33:47 AM
    Author     : eisa
--%>

<%-- <%@page errorPage="Error.jsp" %> --%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<jsp:useBean id="signupBean"  scope="session" class="DatabaseAccessing.Customer" />
    <jsp:setProperty name="signupBean" property="customerName" value="${param.name}" />
    <jsp:setProperty name="signupBean" property="customerEmail" value="${param.email}" />
    <jsp:setProperty name="signupBean" property="credit" value="${param.credit}" />
    <jsp:setProperty name="signupBean" property="passwordHash" value="${param.password}" />
    <jsp:setProperty name="signupBean" property="phoneNumber" value="${param.phone}" />

    <c:choose>
        <c:when test="${empty LOGIN_USER}" >
    <jsp:forward page="Signup" />
        </c:when>
        <c:otherwise>
            <jsp:setProperty name="signupBean" property="customerId" value="${LOGIN_USER.customerId}" />
            <jsp:setProperty name="signupBean" property="manager" value="${LOGIN_USER.manager}" />
            <jsp:forward page="ViewProfile" />
        </c:otherwise>
    </c:choose>
